home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Telephones.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  44.4 KB  |  910 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Telephones.p
  3.  
  4.      Contains:    Telephone Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT Telephones;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __TELEPHONES__}
  27. {$SETC __TELEPHONES__ := 1}
  28.  
  29. {$I+}
  30. {$SETC TelephonesIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __DIALOGS__}
  37. {$I Dialogs.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __ERRORS__}
  40. {$I Errors.p}
  41. {$ENDC}
  42. {$IFC UNDEFINED __EVENTS__}
  43. {$I Events.p}
  44. {$ENDC}
  45. {$IFC UNDEFINED __CTBUTILITIES__}
  46. {$I CTBUtilities.p}
  47. {$ENDC}
  48. {$IFC UNDEFINED __COMPONENTS__}
  49. {$I Components.p}
  50. {$ENDC}
  51.  
  52.  
  53. {$PUSH}
  54. {$ALIGN MAC68K}
  55. {$LibExport+}
  56.  
  57.  
  58. CONST
  59.     curTELVersion                = 3;                            {  current Telephone Manager version  }
  60.                                                                 {     the chooseXXX symbols are defined in CTBUtilities.(pah)  }
  61.     telChooseDisaster            = -2;
  62.     telChooseFailed                = -1;
  63.     telChooseAborted            = 0;
  64.     telChooseOKMinor            = 1;
  65.     telChooseOKMajor            = 2;
  66.     telChooseCancel                = 3;
  67.     telChooseOKTermChanged        = 4;
  68.  
  69. {$IFC UNDEFINED classTEL }
  70.                                                                 {  telephone tool file type  }
  71.     classTEL                    = 'vbnd';
  72.  
  73. {$ENDC}
  74.  
  75.                                                                 {  PHYSICAL TERMINAL CONSTANTS  }
  76.                                                                 {  INDEPENDENT HANDSET CONSTANTS  }
  77.     telIndHSOnHook                = 0;                            {  independent handset on hook  }
  78.     telIndHSOffHook                = 1;                            {  independent handset off hook  }
  79.     telIndHSDisconnected        = 0;                            {  handset disconnected from the line  }
  80.     telIndHSConnected            = 1;                            {  handset connected to the line  }
  81.                                                                 {  HOOK STATE CONSTANTS  }
  82.     telHandset                    = 1;                            {  handset hookswitch  }
  83.     telSpeakerphone                = 2;                            {  speakerphone 'on' switch  }
  84.     telDeviceOffHook            = 1;                            {  device off hook  }
  85.     telDeviceOnHook                = 0;                            {  device on hook  }
  86.                                                                 {  VOLUME CONTROL CONSTANTS  }
  87.     telHandsetSpeakerVol        = 1;                            {  volume of the handset speaker  }
  88.     telHandsetMicVol            = 2;                            {  sensitivity of the handset mic  }
  89.     telSpeakerphoneVol            = 3;                            {  speakerphone volume  }
  90.     telSpeakerphoneMicVol        = 4;                            {  sensitivity of the spkrphone mic  }
  91.     telRingerVol                = 5;                            {  volume of the ringer  }
  92.     telBuiltinSPVol                = 6;                            {  volume of the built-in speakerphone  }
  93.     telBuiltinSPMicVol            = 7;                            {  sensitivity of the built-in speakerphone mic  }
  94.     telVolSame                    = 0;                            {  leaves the volume at previous level  }
  95.     telVolMin                    = 1;                            {  turns volume down to minimum level, but not off  }
  96.     telVolMax                    = 100;                            {  highest level allowed by the Telephone Manager  }
  97.     telVolStateSame                = 0;                            {  leaves device in same state  }
  98.     telVolStateOff                = 1;                            {  turns the device off ,  }
  99.                                                                 {  but doesn't change the volume setting.  }
  100.                                                                 {  Use for mute functions.  }
  101.     telVolStateOn                = 2;                            {  turns the device on.  Volume setting is  }
  102.                                                                 {  the same as previously set. }
  103.                                                                 {  DISPLAY CONSTANTS  }
  104.     telNormalDisplayMode        = 1;                            {  normal display mode  }
  105.     telInspectMode                = 2;                            {  inspect display mode  }
  106.     telMiscMode                    = 3;                            {  miscellaneous display mode  }
  107.     telRetrieveMode                = 4;                            {  message retrieval mode  }
  108.     telDirectoryQueryMode        = 5;                            {  electronic directory mode  }
  109.     telEntireDisplay            = 0;                            {  entire Display  }
  110.                                                                 {  KEY PRESS CONSTANTS  }
  111.     telHangupKey                = 1;                            {  drop, or release, key pressed  }
  112.     telHoldKey                    = 2;                            {  hold key pressed  }
  113.     telConferenceKey            = 3;                            {  conference key pressed  }
  114.     telTransferKey                = 4;                            {  transfer key pressed  }
  115.     telForwardKey                = 5;                            {  call forward key pressed  }
  116.     telCallbackKey                = 6;                            {  call back key pressed  }
  117.     telDNDKey                    = 7;                            {  do not disturb key pressed  }
  118.     telCallPickupKey            = 8;                            {  call Pickup key pressed  }
  119.     telCallParkKey                = 9;                            {  call Park key pressed  }
  120.     telCallDeflectKey            = 10;                            {  call Deflect key pressed  }
  121.     telVoiceMailAccessKey        = 11;                            {  voice Mail Access key pressed  }
  122.     telCallRejectKey            = 12;                            {  call Reject key pressed  }
  123.     telOtherKey                    = 16;                            {  other key pressed  }
  124.     telKeyPadPress                = 1;                            {  key pressed on 12 digit keypad }
  125.     telFeatureKeyPress            = 2;                            {  feature Key Pressed  }
  126.     telTerminalEnabled            = 0;
  127.     telTerminalDisabled            = 1;
  128.     telUnknown                    = 0;                            {  unknown error  }
  129.     telTerminalHWDisconnected    = 1;                            {  terminal hardware is disconnected  }
  130.     telDeviceDriverClosed        = 2;                            {  device driver is closed  }
  131.                                                                 {  ALERT PATTERN  }
  132.     telPattern0                    = 0;
  133.     telPattern1                    = 1;
  134.     telPattern2                    = 2;
  135.     telPattern3                    = 3;
  136.     telPattern4                    = 4;
  137.     telPattern5                    = 5;
  138.     telPattern6                    = 6;
  139.     telPattern7                    = 7;
  140.     telPatternOff                = 8;
  141.     telPatternUndefined            = 15;                            {  DN TYPES  }
  142.     telAllDNs                    = 0;                            {  counts all types of DNs  }
  143.     telInternalDNs                = 1;                            {  connected to PBX or other non-public switch  }
  144.     telInternalDNsOnly            = 2;                            {  connected to PBX or other non-public switch  }
  145.                                                                 {  and able to place internal calls only  }
  146.     telExternalDNs                = 3;                            {  connected to public network  }
  147.     telDNTypeUnknown            = 4;                            {  DN type unknown  }
  148.                                                                 {  DN USAGE  }
  149.     telDNNotUsed                = 0;                            {  DN is not used - onhook  }
  150.     telDNPOTSCall                = 1;                            {  DN used for POTs call  }
  151.     telDNFaxCall                = 2;                            {  DN used for fax call  }
  152.     telDNDataCall                = 3;                            {  DN used for data call  }
  153.     telDNAlerting                = 4;                            {  Incoming call at DN  }
  154.     telDNUnknownState            = 5;                            {  DN is in unknown state  }
  155.                                                                 {  CALL FORWARDING TYPES  }
  156.     telForwardImmediate            = 1;                            {  immediately forward calls  }
  157.     telForwardBusy                = 2;                            {  forward on Busy  }
  158.     telForwardNoAnswer            = 3;                            {  forward on No answer  }
  159.     telForwardBusyNA            = 4;                            {  forwarding for busy and no answer }
  160.     telForwardTypeUnknown        = 5;                            {  type of forwarding is unknown  }
  161.                                                                 {  CALL FORWARDING MESSAGES  }
  162.     telForwardCleared            = 0;                            {  forwarding has been cleared  }
  163.     telForwardEst                = 1;                            {  forwarding has been established }
  164.     telForwardFailed            = 2;                            {  attempt to setup forwarding has failed }
  165.                                                                 {  DO NOT DISTURB TYPES  }
  166.     telDNDIntExt                = 0;                            {  do not disturb for all internal and external calls }
  167.     telDNDExternal                = 1;                            {  do not disturb for external calls only  }
  168.     telDNDInternal                = 2;                            {  do not disturb for internal calls only  }
  169.     telDNDNonIntercom            = 3;                            {  do not disturb for all calls except intercom  }
  170.                                                                 {  DO NOT DISTURB MESSAGES  }
  171.     telDNDCleared                = 0;                            {  do not disturb has been cleared  }
  172.     telDNDEst                    = 1;                            {  do not disturb has been established  }
  173.     telDNDFailed                = 2;                            {  attempt to setup do not disturb has failed  }
  174.                                                                 {  VOICE MAIL MESSAGES  }
  175.     telAllVoiceMessagesRead        = 0;                            {  all messages have been read, none are  waiting  }
  176.                                                                 {  to be read  }
  177.     telNewVoiceMessage            = 1;                            {  a new message has arrived or messages are waiting  }
  178.                                                                 {  for this DN  }
  179.                                                                 {  DNSELECT MESSAGE  }
  180.     telDNDeselected                = 0;                            {  DN has been deselected  }
  181.     telDNSelected                = 1;                            {  DN has been selected  }
  182.                                                                 {  CALL ORIGINATORS  }
  183.     telInternalCall                = 0;                            {  return nth internal CA  }
  184.     telExternalCall                = 1;                            {  return nth external CA  }
  185.     telUnknownCallOrigin        = 2;                            {  unknown call type  }
  186.     telAllCallOrigins            = 2;                            {  return nth CA internal or external  }
  187.                                                                 {  CALL TYPES  }
  188.     telVoiceMailAccessOut        = -7;
  189.     telPageOut                    = -6;
  190.     telIntercomOut                = -5;
  191.     telCallbackOut                = -4;
  192.     telPickup                    = -3;
  193.     telParkRetrieve                = -2;
  194.     telNormalOut                = -1;
  195.     telUnknownCallType            = 0;
  196.     telNormalIn                    = 1;
  197.     telForwardedImmediate        = 2;
  198.     telForwardedBusy            = 3;
  199.     telForwardedNoAnswer        = 4;
  200.     telTransfer                    = 5;
  201.     telDeflected                = 6;
  202.     telIntercepted                = 7;
  203.     telDeflectRecall            = 8;
  204.     telParkRecall                = 9;
  205.     telTransferredRecall        = 10;
  206.     telIntercomIn                = 11;
  207.     telCallbackIn                = 12;                            {  DIAL TYPES  }
  208.     telDNDialable                = 0;                            {  this DN could be dialed via TELSetupCall  }
  209.     telDNNorthAmerican            = 1;                            {  rmtDN is standard North America 10 digit number  }
  210.     telDNInternational            = 2;                            {  rmtDN is an international number  }
  211.     telDNAlmostDialable            = 3;                            {  rmtDN is almost dialable,  }
  212.                                                                 {  missing prefix such as 9 or 1  }
  213.     telDNUnknown                = 15;                            {  unknown whether DN is dialable  }
  214.                                                                 {  CALL PROGRESS MESSAGES  }
  215.     telCAPDialTone                = 1;                            {  dial tone  }
  216.     telCAPRinging                = 2;                            {  destination CA is alerting  }
  217.     telCAPDialing                = 3;                            {  dialing the other end  }
  218.     telCAPReorder                = 4;                            {  reorder  }
  219.     telCAPBusy                    = 5;                            {  busy  }
  220.     telCAPRouted                = 6;                            {  call routed; rmtDN will hold the routing directory  }
  221.                                                                 {  number routeDN and routePartyName have been updated  }
  222.     telCAPRoutedOff                = 7;                            {  call routed off-network; no further progress will  }
  223.                                                                 {  be available  }
  224.     telCAPTimeout                = 8;                            {  call timed out  }
  225.     telCAPUpdate                = 9;                            {  name and rmtDN information has been updated  }
  226.     telCAPPrompt                = 10;                            {  the network is prompting for more information  }
  227.     telCAPWaiting                = 11;                            {  call is proceeding, but there is no response yet  }
  228.                                                                 {  from the destination  }
  229.     telCAPCPC                    = 12;                            {  telephone tool detected CPC signal  }
  230.     telCAPNoDialTone            = 13;                            {  dial tone not detected  }
  231.     telCAPUnknown                = 15;                            {  call progress state unknown  }
  232.     telCAPDialDisabled            = 16;                            {  Blacklisting: Dial Disabled  }
  233.     telCAPBlacklistedNumber        = 17;                            {  Blacklisting: Blacklisted Number  }
  234.     telCAPForbiddenNumber        = 18;                            {  Blacklisting: Forbidden Number  }
  235.     telCAPModemGuardTime        = 19;                            {  Modem Guard Timein force, unable to dial  }
  236.     telCAPLCDetected            = 20;                            {  trying to dial a number while the handset is offhook  }
  237.     telCAPLostLC                = 21;                            {  trying manual dial or answer while handset not off hook  }
  238.                                                                 {  or also lost line current during dialing.  }
  239.                                                                 {  OUTGOING CALL MESSAGES  }
  240.     telPhysical                    = 0;                            {  user lifted handset and initiated call  }
  241.     telProgrammatic                = 1;                            {  programmatic initiation of outgoing call  }
  242.                                                                 {  DISCONNECT MESSAGES  }
  243.     telLocalDisconnect            = 0;                            {  local party, this user, responsible for disconnect  }
  244.     telRemoteDisconnect            = 1;                            {  remote party responsible for disconnect  }
  245.                                                                 {  DISCONNECT TYPES  }
  246.     telCADNormal                = 1;                            {  normal disconnect  }
  247.     telCADBusy                    = 2;                            {  remote user busy  }
  248.     telCADNoResponse            = 3;                            {  remote not responding  }
  249.     telCADRejected                = 4;                            {  call rejected  }
  250.     telCADNumberChanged            = 5;                            {  number changed  }
  251.     telCADInvalidDest            = 6;                            {  invalid destination address  }
  252.     telCADFacilityRejected        = 7;                            {  requested facility rejected  }
  253.     telCADUnobtainableDest        = 9;                            {  destination not obtainable  }
  254.     telCADCongested                = 10;                            {  network congestion  }
  255.     telCADIncompatibleDest        = 11;                            {  incompatible destination  }
  256.     telCADTimeout                = 12;                            {  call timed out  }
  257.     telCADUnknown                = 15;                            {  reason unknown  }
  258.                                                                 {  CONFERENCE MESSAGES  }
  259.     telConferencePrepFailed        = 0;                            {  conference could not be prepared  }
  260.     telConferencePending        = 1;                            {  conference prepared successfully  }
  261.     telConferenceEstFailed        = 2;                            {  conference could not be established  }
  262.     telConferenceEst            = 3;                            {  conference established  }
  263.                                                                 {  TRANSFER MESSAGES  }
  264.     telTransferPrepFailed        = 0;                            {  transfer could not be prepared  }
  265.     telTransferPending            = 1;                            {  transfer prepared successfully  }
  266.     telTransferEst                = 2;                            {  consult or blind xfer successful  }
  267.     telTransferFailed            = 3;                            {  consult or blind xfer failed  }
  268.     telTransferred                = 4;                            {  message to originator of CA specifying  }
  269.                                                                 {  that call was transferred to rmtDN  }
  270.                                                                 {  HOLD MESSAGES  }
  271.     telHoldCleared                = 0;
  272.     telHoldEst                    = 1;
  273.     telHoldFailed                = 2;                            {  RECEIVE DIGIT MESSAGES  }
  274.     telDigitAudible                = 0;
  275.     telDigitNotAudible            = 1;                            {  CALL PARK MESSAGES  }
  276.     telCallParkEst                = 1;                            {  call has been successfully parked  }
  277.     telCallParkRetrieveEst        = 2;                            {  parked Call has been successfully retrieved  }
  278.     telCallParkFailed            = 3;                            {  attempt to setup call park has failed  }
  279.     telCallParkRetrieveFailed    = 4;                            {  attempt to retrieve parked call failed  }
  280.     telCallParkRecall            = 5;                            {  call park has been recalled  }
  281.                                                                 {  CALL BACK MESSAGES  }
  282.     telCallbackCleared            = 0;                            {  call back has been cleared  }
  283.     telCallbackEst                = 1;                            {  call back has been established  }
  284.     telCallbackNowAvail            = 2;                            {  call can be called back with TELCallBackNow  }
  285.                                                                 {  if CA is zero, else call IS calling back on CA  }
  286.     telCallbackFailed            = 3;                            {  attempt to setup callback has failed  }
  287.     telCallbackDesired            = 4;                            {  a user has called this terminal, received no  }
  288.                                                                 {  answer and desires this terminal to call it  }
  289.                                                                 {  back  }
  290.     telCallbackDesiredCleared    = 5;                            {  call back for no answer no longer desired  }
  291.     telCalledback                = 6;                            {  callback has occurred successfully  }
  292.                                                                 {  CALL REJECT MESSAGES  }
  293.     telCallRejectFailed            = 0;                            {  attempt to reject call has failed  }
  294.     telCallRejectEst            = 1;                            {  call successfully rejected  }
  295.     telCallRejected                = 2;                            {  message to originator that call was rejected  }
  296.                                                                 {  CALL DEFLECT MESSAGES  }
  297.     telCallDeflectFailed        = 0;                            {  attempt to deflect call has failed  }
  298.     telCallDeflectEst            = 1;                            {  call successfully deflected  }
  299.     telCallDeflectRecall        = 2;                            {  deflected call has been recalled  }
  300.     telCallDeflected            = 3;                            {  message to originator that call was deflected  }
  301.                                                                 {  to rmtDN  }
  302.     telAutoDeflectImmediate        = 4;                            {  a call was automatically deflected from this  }
  303.                                                                 {  terminal as a result of immediate call  }
  304.                                                                 {  forwarding  }
  305.     telAutoDeflectBusy            = 5;                            {  a call was automatically deflected from this  }
  306.                                                                 {  terminal as a result of call forwarding on busy  }
  307.     telAutoDeflectNoAnswer        = 6;                            {  a call was automatically deflected from this  }
  308.                                                                 {  terminal as a result of call forwarding on  }
  309.                                                                 {  no answer  }
  310.                                                                 {  CONFERENCE SPLIT MESSAGES  }
  311.     telConferenceSplitFailed    = 0;                            {  CA could not be split  }
  312.     telConferenceSplitEst        = 1;                            {  CA split successfully  }
  313.                                                                 {  CONFERENCE DROP MESSAGES  }
  314.     telConferenceDropFailed        = 0;                            {  CA could not be dropped  }
  315.     telConferenceDropped        = 1;                            {  CA dropped successfully  }
  316.                                                                 {  CALL PICKUP MESSAGES  }
  317.     telCallPickupEst            = 0;                            {  call pickup was successful  }
  318.     telCallPickupFailed            = 1;                            {  call pickup failed  }
  319.     telCallPickedUp                = 2;                            {  message to originator that call was picked  }
  320.                                                                 {  up at a different DN  }
  321.                                                                 {  PAGING MESSAGES  }
  322.     telPageEst                    = 0;                            {  paging was successful  }
  323.     telPageComplete                = 1;                            {  paging activity completed  }
  324.     telPageFailed                = 2;                            {  paging failed  }
  325.                                                                 {  INTERCOM MESSAGES  }
  326.     telIntercomEst                = 0;                            {  intercom was successful  }
  327.     telIntercomComplete            = 1;                            {  intercom activity completed  }
  328.     telIntercomFailed            = 2;                            {  intercom failed  }
  329.                                                                 {  MODEM TONE MESSAGES  }
  330.     telModemToneDetected        = 0;                            {  modem tone was detected  }
  331.     telModemToneCleared            = 1;                            {  modem tone went away  }
  332.                                                                 {  FAX TONE MESSAGES  }
  333.     telFaxToneDetected            = 0;                            {  fax tone was detected  }
  334.     telFaxToneCleared            = 1;                            {  fax tone went away  }
  335.                                                                 {  IN USE MESSAGES  }
  336.     telInUsePrivate                = 0;                            {  MADN is in use and can't be accessed  }
  337.     telInUseCanAccess            = 1;                            {  MADN is in use, and others can access it  }
  338.                                                                 {  and join in  }
  339.     telInUseCanMakePrivate        = 2;                            {  MADN is in use, but available for any one  }
  340.                                                                 {  person to access  }
  341.     telInUseCleared                = 3;                            {  MADN is no longer in use  }
  342.                                                                 {  CALL APPEARANCE STATES  }
  343.     telCAIdleState                = 0;                            {  a call doesn't exist at this time  }
  344.     telCAInUseState                = 1;                            {  the call is active but at another terminal  }
  345.     telCAOfferState                = 2;                            {  a call is being offered to the terminal  }
  346.     telCAQueuedState            = 3;                            {  a call is being queued at this terminal  }
  347.     telCAAlertingState            = 4;                            {  a call is alerting at the terminal  }
  348.     telCADialToneState            = 5;                            {  initiated outgoing call has dialtone  }
  349.     telCADialingState            = 6;                            {  initiated outgoing call is dialing  }
  350.     telCAWaitingState            = 7;                            {  initiated outgoing call is waiting for  }
  351.                                                                 {  response from destination  }
  352.     telCARingingState            = 8;                            {  the outgoing call is ringing.  }
  353.     telCABusyState                = 9;                            {  destination is busy or can't be reached  }
  354.     telCAHeldState                = 10;                            {  call has been put on hold by this terminal  }
  355.     telCAConferencedState        = 11;                            {  this CA is part of a conference now  }
  356.     telCAActiveState            = 12;                            {  the call is active and parties are free  }
  357.                                                                 {  to exchange data  }
  358.     telCAReorderState            = 13;                            {  CA is in a reorder state  }
  359.     telCAConferencedHeldState    = 14;                            {  CA is a conference call in a held state  }
  360.     telCAUnknownState            = 15;                            {  the call state is unknown  }
  361.                                                                 {  TERMINAL MESSAGE EVENTMASKS  }
  362.     telTermHookMsg                = $00000001;                    {  the hookswitch state has changed  }
  363.     telTermKeyMsg                = $00000002;                    {  a phone pad key has been depressed  }
  364.     telTermVolMsg                = $00000004;                    {  volume setting has changed  }
  365.     telTermDisplayMsg            = $00000008;                    {  display has changed  }
  366.     telTermEnableMsg            = $00000010;                    {  terminal has become enabled  }
  367.     telTermOpenMsg                = $00000020;                    {  terminal has been opened  }
  368.     telTermCloseMsg                = $00000040;                    {  terminal is shutting down  }
  369.     telTermResetMsg                = $00000080;                    {  terminal has been reset  }
  370.     telTermErrorMsg                = $00000100;                    {  hard equipment error  }
  371.     telTermIndHSStateChgMsg        = $00000200;                    {  change in handset state from inacive to  }
  372.                                                                 {  active or vice versa  }
  373.     telTermIndHSConnectMsg        = $00000400;                    {  independent handset connection has been changed  }
  374.     telTermKeyImmMsg            = $00000800;                    {  immidiate arrival of phone pad key  }
  375.     telTermVolStateMsg            = $00001000;                    {  volume state has changed  }
  376.     telTermOtherMsg                = $80000000;                    {  vendor defined error  }
  377.     telAllTermMsgs                = $00001FFF;                    {  mask to all non tool specific terminal events  }
  378.                                                                 {  DN MESSAGE EVENTMASK CONSTANTS  }
  379.     telDNForwardMsg                = $00000001;                    {  forward feature activity  }
  380.     telDNDNDMsg                    = $00000002;                    {  do not disturb feature activity  }
  381.     telDNVoiceMailMsg            = $00000004;                    {  message has arrived for this DN  }
  382.     telDNSelectedMsg            = $00000008;                    {  DN has been selected or deselected  }
  383.     telDNOtherMsg                = $80000000;                    {  a custom message for use by tools  }
  384.     telAllDNMsgs                = $0000000F;                    {  mask to all non tool specific dn events  }
  385.                                                                 {  CA MESSAGE EVENTMASK CONSTANTS  }
  386.     telCAAlertingMsg            = $00000001;                    {  CA is alerting   }
  387.     telCAOfferMsg                = $00000002;                    {  CA is being offered a call  }
  388.     telCAProgressMsg            = $00000004;                    {  call progress info for this CA  }
  389.     telCAOutgoingMsg            = $00000008;                    {  CA is initiating an outgoing call  }
  390.     telCADisconnectMsg            = $00000010;                    {  CA disconnected (dropped or rmt disc  }
  391.     telCAActiveMsg                = $00000020;                    {  CA is active and voice/data is free  }
  392.                                                                 {  to flow end to end  }
  393.     telCAConferenceMsg            = $00000040;                    {  conference activity on CA  }
  394.     telCATransferMsg            = $00000080;                    {  transfer feature activity  }
  395.     telCAHoldMsg                = $00000100;                    {  hold feature activity  }
  396.     telCADigitsMsg                = $00000200;                    {  remote signaling digits arrived  }
  397.     telCACallParkMsg            = $00000400;                    {  CA call park feature activity  }
  398.     telCACallbackMsg            = $00000800;                    {  CA call back feature activity   }
  399.     telCARejectMsg                = $00001000;                    {  CA is rejected  }
  400.     telCADeflectMsg                = $00002000;                    {  CA is deflected  }
  401.     telCAForwardMsg                = $00004000;                    {  CA is forwarded to this DN   }
  402.     telCAConferenceSplitMsg        = $00008000;                    {  conference split activity   }
  403.     telCAConferenceDropMsg        = $00010000;                    {  conference drop activity   }
  404.     telCAQueuedMsg                = $00020000;                    {  CA has been queued   }
  405.     telCAInUseMsg                = $00040000;                    {  CA is in use   }
  406.     telCACallPickupMsg            = $00080000;                    {  CA pickup activity  }
  407.     telCAPagingMsg                = $00100000;                    {  CA paging activity  }
  408.     telCAIntercomMsg            = $00200000;                    {  CA intercom activity  }
  409.     telCAModemToneMsg            = $00400000;                    {  modem tones detected  }
  410.     telCAFaxToneMsg                = $00800000;                    {  fax tones detected  }
  411.     telCAIdleMsg                = $01000000;                    {  CA is in idle state  }
  412.     telCASuccessiveAlertMsg        = $02000000;                    {  phone is alerting, one per ring  }
  413.     telCAUserUserInfoMsg        = $04000000;                    {  user to user information has arrrived  }
  414.                                                                 {  for this CA  }
  415.     telCAHandOffMsg                = $08000000;                    {  CA is ready for hand-off  }
  416.     telCAVoiceDetectedMsg        = $10000000;                    {  voice Detect related event  }
  417.     telCASilenceDetectedMsg        = $20000000;                    {  silence Detect related event  }
  418.     telCADigitsImmMsg            = $40000000;                    {  immidiate arrival of remote signaling digits  }
  419.     telCAOtherMsg                = $80000000;                    {  tool specific CA message  }
  420.     telAllCAMsgs                = $7FFFFFFF;                    {  mask to all non tool specific CA events  }
  421.  
  422.  
  423. TYPE
  424.     TELErr                                = OSErr;
  425.     TELFlags                            = UInt32;
  426.  
  427. CONST
  428.     telNoMenus                    = $00010000;                    {  tells tool not to display any custom menus  }
  429.     telQuiet                    = $00020000;                    {  tells tool not to display any dialog boxes or alerts  }
  430.     telConfigChanged            = $00040000;                    {  notifies application that the config has changed  }
  431.  
  432.  
  433. TYPE
  434.     TELFeatureFlags                        = UInt32;
  435.  
  436. CONST
  437.     pcmAvail                    = $00000001;                    {  true if PCM voice data accessible  }
  438.     hasHandset                    = $00000002;                    {  true if a phone handset is attached   }
  439.     hasSpeakerphone                = $00000004;                    {  true if a 2 way speakerphone is attached  }
  440.     canOnHookDial                = $00000008;                    {  can on-hook dial  }
  441.     hasRinger                    = $00000010;                    {  terminal has its own ringer  }
  442.     canSetDisplay                = $00000020;                    {  application can write to the display  }
  443.     hasKeypad                    = $00000040;                    {  attached phone has standard 12 key pad  }
  444.     hasVideo                    = $00000080;                    {  terminal has a videophone  }
  445.     hasOther                    = $00000100;                    {  reserved for future use  }
  446.     crossDNConference            = $00000200;                    {  can perform cross-DN conferences  }
  447.     hasSubaddress                = $00000400;                    {  attached network supports subaddressing  }
  448.     hasUserUserInfo                = $00000800;                    {  network supports user-to-user info  }
  449.     hasHandsetSoundStreams        = $00001000;                    {  sound streams are supported on the handset  }
  450.     hasIndHandset                = $00002000;                    {  handset can be accessed independently of the phone line  }
  451.     hasBuiltinSpeakerphone        = $00004000;                    {  speaker and microphone of the Mac can be used  }
  452.  
  453.  
  454.  
  455. TYPE
  456.     TELTermRecordPtr = ^TELTermRecord;
  457.     TELTermRecord = RECORD
  458.         tRef:                    INTEGER;
  459.         featureFlags:            TELFeatureFlags;
  460.         handsetSpeakerVol:        INTEGER;
  461.         handsetMicVol:            INTEGER;
  462.         speakerphoneVol:        INTEGER;
  463.         speakerphoneMicVol:        INTEGER;
  464.         ringerVol:                INTEGER;
  465.         otherVol:                INTEGER;
  466.         ringerTypes:            INTEGER;
  467.         hasDisplay:                INTEGER;
  468.         displayRows:            INTEGER;
  469.         numDNs:                    INTEGER;
  470.         maxAllocCA:                INTEGER;
  471.         curAllocCA:                INTEGER;
  472.         builtinSpeakerVol:        INTEGER;
  473.         builtinSpeakerMicVol:    INTEGER;
  474.         reserved:                LONGINT;
  475.     END;
  476.  
  477.     TELTermPtr                            = ^TELTermRecord;
  478.     TELRecordPtr = ^TELRecord;
  479.     TELRecord = RECORD
  480.         procID:                    INTEGER;
  481.         flags:                    TELFlags;
  482.         reserved:                INTEGER;
  483.         refCon:                    LONGINT;
  484.         userData:                LONGINT;
  485.         defproc:                UniversalProcPtr;
  486.         config:                    Ptr;
  487.         oldConfig:                Ptr;
  488.         pTELTerm:                TELTermPtr;
  489.         telPrivate:                LONGINT;
  490.         reserved1:                LONGINT;
  491.         reserved2:                LONGINT;
  492.         pTELTermSize:            LONGINT;
  493.         version:                INTEGER;
  494.     END;
  495.  
  496.     TELPtr                                = ^TELRecord;
  497.     TELHandle                            = ^TELPtr;
  498.     TELDNFeatureFlags                    = UInt32;
  499.  
  500. CONST
  501.     dndSub                        = $00000001;                    {  do not disturb subscribed  }
  502.     dndAvail                    = $00000002;                    {  do not disturb available  }
  503.     dndActive                    = $00000004;                    {  do not disturb active  }
  504.     voiceMailAccessSub            = $00000008;                    {  message waiting subscribed  }
  505.     voiceMailAccessAvail        = $00000010;                    {  message waiting available  }
  506.     voiceMailAccessActive        = $00000020;                    {  message waiting active  }
  507.     pagingSub                    = $00000040;                    {  paging is subscribed  }
  508.     pagingAvail                    = $00000080;                    {  paging is available  }
  509.     pagingActive                = $00000100;                    {  paging is active  }
  510.     intercomSub                    = $00000200;                    {  intercom is subscribed  }
  511.     intercomAvail                = $00000400;                    {  intercom is available  }
  512.     intercomActive                = $00000800;                    {  intercom is active  }
  513.     dnSelectSub                    = $00001000;                    {  DN select is subscribed  }
  514.     dnSelectAvail                = $00002000;                    {  DN select is available  }
  515.     dnSelectActive                = $00004000;                    {  DN is selected  }
  516.     callPickupSub                = $00008000;                    {  call pickup is subscribed  }
  517.     callPickupAvail                = $00010000;                    {  call pickup is available  }
  518.     dnInUse                        = $00020000;                    {  a CA is allocated for this DN  }
  519.     logicalDN                    = $00040000;                    {  this DN is not on this terminal  }
  520.     dnAccessible                = $00080000;                    {  commands can be sent to this DN  }
  521.     canInitiate                    = $00100000;                    {  an outgoing CA can be initiated  }
  522.     voiceMessageWaiting            = $00200000;                    {  voice mail waiting for this dn  }
  523.     hasDNSoundStreams            = $00400000;                    {  sound streams are supported on this DN  }
  524.     autoAnswerAvail                = $00800000;                    {  AutoAnswer is set for this DN  }
  525.     autoAnswerActive            = $01000000;                    {  AutoAnswer is currently applied to CA on this DN  }
  526.     tollSaverAvail                = $02000000;                    {  tollSaver is set for this DN  }
  527.     tollSaverActive                = $04000000;                    {  tollSaver is currently applied to CA on this DN  }
  528.  
  529.  
  530. TYPE
  531.     TELDNForwardFlags                    = UInt32;
  532.  
  533. CONST
  534.     immediateForwardSub            = $00000001;                    {  immediate call forward subscribed  }
  535.     immediateForwardAvail        = $00000002;                    {  immediate call forward available  }
  536.     immediateForwardActive        = $00000004;                    {  immediate call forward active  }
  537.     busyForwardSub                = $00000008;                    {  forward on busy subscribed  }
  538.     busyForwardAvail            = $00000010;                    {  forward on busy available  }
  539.     busyForwardActive            = $00000020;                    {  forward on busy active  }
  540.     noAnswerForwardSub            = $00000040;                    {  no answer call forward subscribed  }
  541.     noAnswerForwardAvail        = $00000080;                    {  no answer call forward available  }
  542.     noAnswerForwardActive        = $00000100;                    {  no answer call forward active  }
  543.     busyNAForwardSub            = $00000200;                    {  busy & no answer call forward subscribed  }
  544.     busyNAForwardAvail            = $00000400;                    {  busy & no answer call forward available  }
  545.     busyNAForwardActive            = $00000800;                    {  busy & no answer call forward active  }
  546.  
  547.  
  548.  
  549. TYPE
  550.     TELDNRecordPtr = ^TELDNRecord;
  551.     TELDNRecord = RECORD
  552.         dnRef:                    INTEGER;
  553.         dn:                        StringPtr;
  554.         dnPartyName:            StringPtr;
  555.         dnSubaddress:            StringPtr;
  556.         hTEL:                    TELHandle;
  557.         maxAllocCA:                INTEGER;
  558.         curAllocCA:                INTEGER;
  559.         dnType:                    INTEGER;
  560.         featureFlags:            TELDNFeatureFlags;
  561.         numPageIDs:                INTEGER;
  562.         numIntercomIDs:            INTEGER;
  563.         numPickupIDs:            INTEGER;
  564.         forwardFlags:            TELDNForwardFlags;
  565.         iForwardDN:                StringPtr;
  566.         iForwardSubaddress:        StringPtr;
  567.         iForwardPartyName:        StringPtr;
  568.         bForwardDN:                StringPtr;
  569.         bForwardSubaddress:        StringPtr;
  570.         bForwardPartyName:        StringPtr;
  571.         naForwardDN:            StringPtr;
  572.         naForwardSubaddress:    StringPtr;
  573.         naForwardPartyName:        StringPtr;
  574.         naForwardRings:            INTEGER;
  575.         telDNPrivate:            LONGINT;
  576.         refCon:                    LONGINT;
  577.         userData:                LONGINT;
  578.         reserved:                LONGINT;
  579.     END;
  580.  
  581.     TELDNPtr                            = ^TELDNRecord;
  582.     TELDNHandle                            = ^TELDNPtr;
  583.     TELCAFeatureFlags                    = UInt32;
  584.  
  585. CONST
  586.     holdSub                        = $00000001;                    {  hold subscribed   }
  587.     holdAvail                    = $00000002;                    {  hold available   }
  588.     holdActive                    = $00000004;                    {  hold active   }
  589.     conferenceSub                = $00000008;                    {  conference subscribed  }
  590.     conferenceAvail                = $00000010;                    {  conference available  }
  591.     conferenceActive            = $00000020;                    {  conference active   }
  592.     conferenceDropSub            = $00000040;                    {  conference drop subscribed   }
  593.     conferenceDropAvail            = $00000080;                    {  a call to TELDrop will drop this  }
  594.                                                                 {  CA only from a conference  }
  595.     conferenceSplitSub            = $00000100;                    {  conference split subscribed   }
  596.     conferenceSplitAvail        = $00000200;                    {  conference split available for this CA  }
  597.     numToConferenceRequired        = $00000400;                    {  the number of CAs to be conferenced is  }
  598.                                                                 {  required in TELConfPrep   }
  599.     transferSub                    = $00000800;                    {  transfer subscribed   }
  600.     transferAvail                = $00001000;                    {  transfer available   }
  601.     transferActive                = $00002000;                    {  transfer active  }
  602.     caRelated                    = $00004000;                    {  this CA is the specified in some other CA's relatedCA field }
  603.  
  604.  
  605. TYPE
  606.     TELCAOtherFeatures                    = UInt32;
  607.  
  608. CONST
  609.     callbackSub                    = $00000001;                    {  call back subscribed  }
  610.     callbackAvail                = $00000002;                    {  call back available  }
  611.     callbackActive                = $00000004;                    {  call back active   }
  612.     callbackClearSub            = $00000008;                    {  call back clearing subscribed  }
  613.     callbackNowSub                = $00000010;                    {  call back now subscribed  }
  614.     callbackNowAvail            = $00000020;                    {  call back now available   }
  615.     callbackBusy                = $00000040;                    {  call back on busy  }
  616.     callbackNoAnswer            = $00000080;                    {  call back on no answer  }
  617.     callbackReturnsRef            = $00000100;                    {  call back returns a reference  }
  618.     parkSub                        = $00000200;                    {  call park subscribed  }
  619.     parkAvail                    = $00000400;                    {  call park available  }
  620.     parkActive                    = $00000800;                    {  call park active  }
  621.     parkRetrieveSub                = $00001000;                    {  call park retrieve subscribed  }
  622.     parkRetrieveWithID            = $00002000;                    {  retrieve parked calls with IDs  }
  623.     parkWithReturnedID            = $00004000;                    {  park call to a specific remote ID  }
  624.     parkWithGivenID                = $00040000;                    {  for switch that requires ID for parking  }
  625.     rejectable                    = $00008000;                    {  CA is rejectable   }
  626.     deflectable                    = $00010000;                    {  CA is deflectable   }
  627.     acceptable                    = $00020000;                    {  CA is acceptable  }
  628.     voiceDetected                = $00080000;                    {  voice has been detected on this CA incase of  }
  629.                                                                 {  an incoming call  }
  630.     callAnswdTSRings            = $00100000;                    {  incoimng call was answered on TollSaver rings  }
  631.  
  632.  
  633. TYPE
  634.     TELCARecordPtr = ^TELCARecord;
  635.     TELCAPtr                            = ^TELCARecord;
  636.     TELCAHandle                            = ^TELCAPtr;
  637.     TELCARecord = RECORD
  638.         caRef:                    INTEGER;
  639.         hTELDN:                    TELDNHandle;
  640.         hTEL:                    TELHandle;
  641.         caState:                INTEGER;
  642.         relatedCA:                TELCAHandle;
  643.         connectTime:            LONGINT;                                {  can be used by application to keep track of connect time  }
  644.         intExt:                    INTEGER;
  645.         callType:                INTEGER;
  646.         dialType:                INTEGER;
  647.         bearerType:                INTEGER;
  648.         rate:                    INTEGER;
  649.         rmtDN:                    StringPtr;
  650.         rmtPartyName:            StringPtr;
  651.         rmtSubaddress:            StringPtr;
  652.         routeDN:                StringPtr;
  653.         routePartyName:            StringPtr;
  654.         routeSubaddress:        StringPtr;
  655.         priority:                INTEGER;
  656.         conferenceLimit:        INTEGER;
  657.         featureFlags:            TELCAFeatureFlags;
  658.         otherFeatures:            TELCAOtherFeatures;
  659.         telCAPrivate:            LONGINT;
  660.         refCon:                    LONGINT;
  661.         userData:                LONGINT;
  662.         reserved:                LONGINT;
  663.     END;
  664.  
  665. { Constants for HandleType in structure above }
  666.  
  667. CONST
  668.     telHandleType                = 0;                            {  feature requires a terminal handle  }
  669.     telDNHandleType                = 1;                            {  feature requires a DN handle  }
  670.     telCAHandleType                = 2;                            {  feature requires a CA handle  }
  671.  
  672.  
  673. TYPE
  674.     FeatureListPtr = ^FeatureList;
  675.     FeatureList = RECORD
  676.         featureID:                INTEGER;
  677.         featureName:            StringPtr;
  678.         handleType:                INTEGER;
  679.         nextFeature:            FeatureListPtr;
  680.     END;
  681.  
  682. { CA MESSAGE STRUCTURES FOR MSGINFO }
  683.     CAGenericMsgRecPtr = ^CAGenericMsgRec;
  684.     CAGenericMsgRec = RECORD
  685.         rmtDN:                    StringPtr;
  686.         rmtName:                StringPtr;
  687.         rmtSubaddress:            StringPtr;
  688.         dialType:                INTEGER;
  689.     END;
  690.  
  691.     CAUserUserInfoMsgRecPtr = ^CAUserUserInfoMsgRec;
  692.     CAUserUserInfoMsgRec = RECORD
  693.         userUserInfo:            StringPtr;
  694.     END;
  695.  
  696.     CAConfMsgRecPtr = ^CAConfMsgRec;
  697.     CAConfMsgRec = RECORD
  698.         relatedCA:                TELCAHandle;
  699.     END;
  700.  
  701.     CATransfMsgRecPtr = ^CATransfMsgRec;
  702.     CATransfMsgRec = RECORD
  703.         rmtDN:                    StringPtr;
  704.         rmtName:                StringPtr;
  705.         rmtSubaddress:            StringPtr;
  706.         dialType:                INTEGER;
  707.         prepCA:                    TELCAHandle;
  708.     END;
  709.  
  710. {$IFC TYPED_FUNCTION_POINTERS}
  711.     TelephoneTermMsgProcPtr = PROCEDURE(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT);
  712. {$ELSEC}
  713.     TelephoneTermMsgProcPtr = ProcPtr;
  714. {$ENDC}
  715.  
  716. {$IFC TYPED_FUNCTION_POINTERS}
  717.     TelephoneDNMsgProcPtr = PROCEDURE(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255; globals: LONGINT);
  718. {$ELSEC}
  719.     TelephoneDNMsgProcPtr = ProcPtr;
  720. {$ENDC}
  721.  
  722. {$IFC TYPED_FUNCTION_POINTERS}
  723.     TelephoneCAMsgProcPtr = PROCEDURE(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT);
  724. {$ELSEC}
  725.     TelephoneCAMsgProcPtr = ProcPtr;
  726. {$ENDC}
  727.  
  728. {$IFC TYPED_FUNCTION_POINTERS}
  729.     TelephoneChooseIdleProcPtr = PROCEDURE;
  730. {$ELSEC}
  731.     TelephoneChooseIdleProcPtr = ProcPtr;
  732. {$ENDC}
  733.  
  734.     TelephoneTermMsgUPP = UniversalProcPtr;
  735.     TelephoneDNMsgUPP = UniversalProcPtr;
  736.     TelephoneCAMsgUPP = UniversalProcPtr;
  737.     TelephoneChooseIdleUPP = UniversalProcPtr;
  738.  
  739. CONST
  740.     uppTelephoneTermMsgProcInfo = $0000EBC0;
  741.     uppTelephoneDNMsgProcInfo = $003FEBC0;
  742.     uppTelephoneCAMsgProcInfo = $0003EBC0;
  743.     uppTelephoneChooseIdleProcInfo = $00000000;
  744.  
  745. FUNCTION NewTelephoneTermMsgProc(userRoutine: TelephoneTermMsgProcPtr): TelephoneTermMsgUPP;
  746.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  747.     INLINE $2E9F;
  748.     {$ENDC}
  749.  
  750. FUNCTION NewTelephoneDNMsgProc(userRoutine: TelephoneDNMsgProcPtr): TelephoneDNMsgUPP;
  751.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  752.     INLINE $2E9F;
  753.     {$ENDC}
  754.  
  755. FUNCTION NewTelephoneCAMsgProc(userRoutine: TelephoneCAMsgProcPtr): TelephoneCAMsgUPP;
  756.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  757.     INLINE $2E9F;
  758.     {$ENDC}
  759.  
  760. FUNCTION NewTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleProcPtr): TelephoneChooseIdleUPP;
  761.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  762.     INLINE $2E9F;
  763.     {$ENDC}
  764.  
  765. PROCEDURE CallTelephoneTermMsgProc(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT; userRoutine: TelephoneTermMsgUPP);
  766.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  767.     INLINE $205F, $4E90;
  768.     {$ENDC}
  769.  
  770. PROCEDURE CallTelephoneDNMsgProc(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255; globals: LONGINT; userRoutine: TelephoneDNMsgUPP);
  771.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  772.     INLINE $205F, $4E90;
  773.     {$ENDC}
  774.  
  775. PROCEDURE CallTelephoneCAMsgProc(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT; userRoutine: TelephoneCAMsgUPP);
  776.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  777.     INLINE $205F, $4E90;
  778.     {$ENDC}
  779.  
  780. PROCEDURE CallTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleUPP);
  781.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  782.     INLINE $205F, $4E90;
  783.     {$ENDC}
  784. FUNCTION InitTEL: TELErr;
  785. FUNCTION TELGetInfo(hTEL: TELHandle): TELErr;
  786. FUNCTION TELOpenTerm(hTEL: TELHandle): TELErr;
  787. FUNCTION TELResetTerm(hTEL: TELHandle): TELErr;
  788. FUNCTION TELCloseTerm(hTEL: TELHandle): TELErr;
  789. FUNCTION TELTermMsgHand(hTEL: TELHandle; eventMask: LONGINT; msgProc: TelephoneTermMsgUPP; globals: LONGINT): TELErr;
  790. FUNCTION TELClrTermMsgHand(hTEL: TELHandle; msgProc: TelephoneTermMsgUPP): TELErr;
  791. FUNCTION TELTermEventsSupp(hTEL: TELHandle; VAR eventMask: LONGINT): TELErr;
  792. FUNCTION TELGetProcID(VAR name: Str255): INTEGER;
  793. FUNCTION TELNew(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT): TELHandle;
  794. FUNCTION TELNewWithResult(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT; VAR error: TELErr): TELHandle;
  795. FUNCTION TELDefault(VAR theConfig: Ptr; procID: INTEGER; allocate: BOOLEAN): TELErr;
  796. FUNCTION TELValidate(hTEL: TELHandle): BOOLEAN;
  797. FUNCTION TELGetConfig(hTEL: TELHandle): Ptr;
  798. FUNCTION TELSetConfig(hTEL: TELHandle; thePtr: Ptr): INTEGER;
  799. FUNCTION TELChoose(VAR hTEL: TELHandle; where: Point; idleProc: TelephoneChooseIdleUPP): TELErr;
  800. FUNCTION TELSetupPreflight(procID: INTEGER; VAR magicCookie: LONGINT): Handle;
  801. PROCEDURE TELSetupSetup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  802. FUNCTION TELSetupFilter(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theEvent: EventRecord; VAR theItem: INTEGER; VAR magicCookie: LONGINT): BOOLEAN;
  803. PROCEDURE TELSetupItem(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theItem: INTEGER; VAR magicCookie: LONGINT);
  804. PROCEDURE TELSetupCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  805. PROCEDURE TELSetupXCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; OKed: BOOLEAN; VAR magicCookie: LONGINT);
  806. PROCEDURE TELSetupPostflight(procID: INTEGER);
  807. FUNCTION TELDispose(hTEL: TELHandle): TELErr;
  808. FUNCTION TELCountDNs(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN): INTEGER;
  809. FUNCTION TELDNLookupByIndex(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN; index: INTEGER; VAR hTELDN: TELDNHandle): TELErr;
  810. FUNCTION TELDNLookupByName(hTEL: TELHandle; DN: Str255; VAR hTELDN: TELDNHandle): TELErr;
  811. FUNCTION TELDNSelect(hTELDN: TELDNHandle; select: BOOLEAN): TELErr;
  812. FUNCTION TELDNDispose(hTELDN: TELDNHandle): TELErr;
  813. FUNCTION TELGetDNInfo(hTELDN: TELDNHandle): TELErr;
  814. FUNCTION TELGetDNFlags(hTELDN: TELDNHandle; VAR dnFeatureFlags: LONGINT; VAR dnForwardFlags: LONGINT): TELErr;
  815. FUNCTION TELDNMsgHand(hTELDN: TELDNHandle; allDNs: BOOLEAN; eventMask: LONGINT; msgProc: TelephoneDNMsgUPP; globals: LONGINT): TELErr;
  816. FUNCTION TELClrDNMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneDNMsgUPP): TELErr;
  817. FUNCTION TELDNEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  818. FUNCTION TELCountCAs(hTELDN: TELDNHandle; internalExternal: INTEGER): INTEGER;
  819. FUNCTION TELCALookup(hTELDN: TELDNHandle; internalExternal: INTEGER; index: INTEGER; VAR hTELCA: TELCAHandle): TELErr;
  820. FUNCTION TELCADispose(hTELCA: TELCAHandle): TELErr;
  821. FUNCTION TELGetCAState(hTELCA: TELCAHandle; VAR state: INTEGER): TELErr;
  822. FUNCTION TELGetCAFlags(hTELCA: TELCAHandle; VAR caFeatureFlags: LONGINT; VAR caOtherFeatures: LONGINT): TELErr;
  823. FUNCTION TELGetCAInfo(hTELCA: TELCAHandle): TELErr;
  824. FUNCTION TELCAMsgHand(hTELDN: TELDNHandle; eventMask: LONGINT; msgProc: TelephoneCAMsgUPP; globals: LONGINT): TELErr;
  825. FUNCTION TELClrCAMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneCAMsgUPP): TELErr;
  826. FUNCTION TELCAEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  827. FUNCTION TELSetupCall(hTELDN: TELDNHandle; VAR hTELCA: TELCAHandle; destDN: Str255; destName: Str255; destSubaddress: Str255; userUserInfo: Str255; bearerType: INTEGER; rate: INTEGER): TELErr;
  828. FUNCTION TELConnect(hTELCA: TELCAHandle): TELErr;
  829. FUNCTION TELDialDigits(hTELCA: TELCAHandle; digits: Str255): TELErr;
  830. FUNCTION TELAcceptCall(hTELCA: TELCAHandle): TELErr;
  831. FUNCTION TELRejectCall(hTELCA: TELCAHandle; reason: INTEGER): TELErr;
  832. FUNCTION TELDeflectCall(hTELCA: TELCAHandle; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255): TELErr;
  833. FUNCTION TELAnswerCall(hTELCA: TELCAHandle): TELErr;
  834. FUNCTION TELDrop(hTELCA: TELCAHandle; userUserInfo: Str255): TELErr;
  835. FUNCTION TELHold(hTELCA: TELCAHandle): TELErr;
  836. FUNCTION TELRetrieve(hTELCA: TELCAHandle): TELErr;
  837. FUNCTION TELConferencePrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle; numToConference: INTEGER): TELErr;
  838. FUNCTION TELConferenceEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  839. FUNCTION TELConferenceSplit(hTELCA: TELCAHandle): TELErr;
  840. FUNCTION TELTransferPrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  841. FUNCTION TELTransferEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  842. FUNCTION TELTransferBlind(hTELCA: TELCAHandle; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255): TELErr;
  843. FUNCTION TELForwardSet(hTELDN: TELDNHandle; forwardDN: Str255; forwardName: Str255; forwardSubaddress: Str255; forwardType: INTEGER; numrings: INTEGER): TELErr;
  844. FUNCTION TELForwardClear(hTELDN: TELDNHandle; forwardType: INTEGER): TELErr;
  845. FUNCTION TELCallbackSet(hTELCA: TELCAHandle; VAR callbackRef: INTEGER): TELErr;
  846. FUNCTION TELCallbackClear(hTEL: TELHandle; callbackRef: INTEGER): TELErr;
  847. FUNCTION TELCallbackNow(hTELCA: TELCAHandle; callbackRef: INTEGER): TELErr;
  848. FUNCTION TELDNDSet(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  849. FUNCTION TELDNDClear(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  850. FUNCTION TELCallPickup(hTELCA: TELCAHandle; pickupDN: Str255; pickupGroupID: INTEGER): TELErr;
  851. FUNCTION TELParkCall(hTELCA: TELCAHandle; VAR parkRetrieveID: StringPtr; parkID: Str255): TELErr;
  852. FUNCTION TELRetrieveParkedCall(hTELCA: TELCAHandle; parkRetrieveID: Str255): TELErr;
  853. FUNCTION TELVoiceMailAccess(hTELCA: TELCAHandle): TELErr;
  854. FUNCTION TELPaging(hTELCA: TELCAHandle; pageID: INTEGER): TELErr;
  855. FUNCTION TELIntercom(hTELCA: TELCAHandle; intercomID: INTEGER): TELErr;
  856. FUNCTION TELOtherFeatureList(hTEL: TELHandle; VAR fList: FeatureListPtr): TELErr;
  857. FUNCTION TELOtherFeatureImplement(hTEL: TELHandle; theHandle: Handle; featureID: INTEGER): TELErr;
  858. FUNCTION TELToolFunctions(hTEL: TELHandle; msgcode: INTEGER; VAR supportsIt: BOOLEAN): TELErr;
  859. FUNCTION TELOtherFunction(hTEL: TELHandle; paramblock: Ptr; size: LONGINT): TELErr;
  860. FUNCTION TELGetHooksw(hTEL: TELHandle; hookType: INTEGER; VAR offHook: BOOLEAN): TELErr;
  861. FUNCTION TELSetHooksw(hTEL: TELHandle; hookType: INTEGER; offHook: BOOLEAN): TELErr;
  862. FUNCTION TELGetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; VAR volState: INTEGER): TELErr;
  863. FUNCTION TELSetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; volState: INTEGER): TELErr;
  864. FUNCTION TELAlert(hTEL: TELHandle; VAR level: INTEGER; alertPattern: INTEGER): TELErr;
  865. FUNCTION TELGetDisplay(hTEL: TELHandle; index: INTEGER; VAR displayMode: INTEGER; VAR text: StringPtr): TELErr;
  866. FUNCTION TELSetDisplay(hTEL: TELHandle; index: INTEGER; displayMode: INTEGER; text: Str255): TELErr;
  867. PROCEDURE TELIdle(hTEL: TELHandle);
  868. PROCEDURE TELActivate(hTEL: TELHandle; activate: BOOLEAN);
  869. PROCEDURE TELResume(hTEL: TELHandle; resume: BOOLEAN);
  870. FUNCTION TELMenu(hTEL: TELHandle; menuID: INTEGER; item: INTEGER): BOOLEAN;
  871. PROCEDURE TELEvent(hTEL: TELHandle; {CONST}VAR theEvent: EventRecord);
  872. PROCEDURE TELGetToolName(procID: INTEGER; VAR name: Str255);
  873. FUNCTION TELGetVersion(hTEL: TELHandle): Handle;
  874. FUNCTION TELGetTELVersion: INTEGER;
  875. FUNCTION TELIntlToEnglish(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  876. FUNCTION TELEnglishToIntl(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  877. FUNCTION TELGetDNSoundInput(hTELDN: TELDNHandle; VAR deviceName: Str255): TELErr;
  878. FUNCTION TELDisposeDNSoundInput(hTELDN: TELDNHandle; deviceName: Str255): TELErr;
  879. FUNCTION TELGetDNSoundOutput(hTELDN: TELDNHandle; VAR SndOut: Component): TELErr;
  880. FUNCTION TELDisposeDNSoundOutput(hTELDN: TELDNHandle; SndOut: Component): TELErr;
  881. FUNCTION TELGetHSSoundInput(termHand: TELHandle; VAR deviceName: Str255): TELErr;
  882. FUNCTION TELDisposeHSSoundInput(termHand: TELHandle; deviceName: Str255): TELErr;
  883. FUNCTION TELGetHSSoundOutput(termHand: TELHandle; VAR SndOut: Component): TELErr;
  884. FUNCTION TELDisposeHSSoundOutput(termHand: TELHandle; SndOut: Component): TELErr;
  885. FUNCTION TELDNSetAutoAnswer(hTELDN: TELDNHandle; AutoAnswerOn: BOOLEAN): TELErr;
  886. FUNCTION TELDNTollSaverControl(hTELDN: TELDNHandle; QuickAnswer: BOOLEAN): TELErr;
  887. FUNCTION TELSetIndHSConnect(termHand: TELHandle; Connect: BOOLEAN): TELErr;
  888. FUNCTION TELGetIndHSConnect(termHand: TELHandle; VAR Connect: BOOLEAN): TELErr;
  889. FUNCTION TELCAVoiceDetect(hTELCA: TELCAHandle; VoiceDetectOn: BOOLEAN): TELErr;
  890. FUNCTION TELCASilenceDetect(hTELCA: TELCAHandle; DetectOn: BOOLEAN; Period: LONGINT): TELErr;
  891. FUNCTION TELGetTelNewErr: TELErr;
  892. FUNCTION TELDNSetDTMF(hTELDN: TELDNHandle; dtmfOn: BOOLEAN): TELErr;
  893. FUNCTION TELDNGetDTMF(hTELDN: TELDNHandle; VAR dtmfOn: BOOLEAN): TELErr;
  894. FUNCTION TELHSSetDTMF(termHand: TELHandle; dtmfOn: BOOLEAN): TELErr;
  895. FUNCTION TELHSGetDTMF(termHand: TELHandle; VAR dtmfOn: BOOLEAN): TELErr;
  896. FUNCTION TELGetDNStatus(hTELDN: TELDNHandle; VAR inUse: LONGINT): TELErr;
  897. FUNCTION TELGetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; VAR prgDetOn: BOOLEAN): TELErr;
  898. FUNCTION TELSetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; prgDetOn: BOOLEAN): TELErr;
  899.  
  900. {$ALIGN RESET}
  901. {$POP}
  902.  
  903. {$SETC UsingIncludes := TelephonesIncludes}
  904.  
  905. {$ENDC} {__TELEPHONES__}
  906.  
  907. {$IFC NOT UsingIncludes}
  908.  END.
  909. {$ENDC}
  910.